<?php
 function setChapters()
 {
   if (!isset($_SESSION['chapterPanel'])) {
     if (isset($_POST['chapterPanel'])) {
       $chapter = $_POST['chapterPanel'];
       $_SESSION['chapterPanel'] = $chapter;
     }
   }
 }

 function setSubjects()
 {
   if (!isset($_SESSION['subjectPanel'])) {
     if (isset($_POST['subjectPanel'])) {
       $chapter = $_POST['subjectPanel'];
       $_SESSION['subjectPanel'] = $chapter;
     }
   }
 }
